-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
track adt variant and field names do not conflict #175
Conversation
The intent of this change is to add a check for adts that enum variant names are unique, and that struct and enum field names are unique (within a given enum variant).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good modulo @lcnr's suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there!
src/test/mod.rs
Outdated
} | ||
] | ||
|
||
[ /* TODO */ ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add suggested messages in here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I copied this from pre-existing tests in this file, so I had no idea what to put here, but scrolled down and found some other examples. This is supposed to be some summary of what's wrong with the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah wait, maybe instead it's some relevant substring in the error output that shouldn't change even when you update the expect output? (guessing from assert_err!
naming that tt must_have
and the other expect
)
src/test/mod.rs
Outdated
} | ||
] | ||
|
||
[ /* TODO */ ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
The intent of this change is to add a check for adts that enum variant names are unique, and that struct and enum field names are unique (within a given enum variant).